<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Class bmqa::MessageEventBuilder</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="bdedox.css" rel="stylesheet" type="text/css"/>
    <style>
      div.hanging {
        padding-left: 0.75in;
        text-indent: -0.50in;
      }
      div.unhanging {
        text-indent:     0in;
      }
      a.glossary {
        font-weight: bold;
        font-style: italic;
      }
    </style>
</head>
<!--
<body onload='searchBox.OnSelectItem(0);'>
-->
<body>

<table border=2 cellspacing=0 cellpadding=0 align=center>
<tr>
 <td valign=top align=center>
 <p align=center><b><i>Quick Links:</i></b></p>
 </td>
 <td valign=top align=center>
 <p align=center>
<a class="qindex" href="group__bmqa.html" target="_blank">bmqa</a> | <a class="qindex" href="group__bmqpi.html" target="_blank">bmqpi</a> | <a class="qindex" href="group__bmqt.html" target="_blank">bmqt</a>
 </td>
 </tr>
 </table>

  </div>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="components.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="components.html"><span>Components</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath">
    <ul>
      <li><a class="el" href="namespacebmqa.html">bmqa</a>      </li>
      <li><a class="el" href="classbmqa_1_1MessageEventBuilder.html">bmqa::MessageEventBuilder</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<h1>bmqa::MessageEventBuilder Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="bmqa::MessageEventBuilder" -->
<p><code>#include &lt;<a class="el" href="bmqa__messageeventbuilder_8h_source.html">bmqa_messageeventbuilder.h</a>&gt;</code></p>

<p><a href="classbmqa_1_1MessageEventBuilder-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbmqa_1_1MessageEventBuilder.html#a0fe3e05575bbdeeb3cc73ab3505692af">MessageEventBuilder</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbmqa_1_1MessageEventBuilder.html#a39acd6b649f873adfe7adf665226bc15">~MessageEventBuilder</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbmqa_1_1MessageEventBuilder.html#a00bf60e4b22e20410a7d94b9fd2fbe32">MessageEventBuilder</a> (const <a class="el" href="classbmqa_1_1MessageEventBuilder.html">MessageEventBuilder</a> &amp;)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbmqa_1_1MessageEventBuilder.html">MessageEventBuilder</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbmqa_1_1MessageEventBuilder.html#ac49dff9dc344e34652bb22af127785d2">operator=</a> (const <a class="el" href="classbmqa_1_1MessageEventBuilder.html">MessageEventBuilder</a> &amp;)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbmqa_1_1Message.html">Message</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbmqa_1_1MessageEventBuilder.html#a33d687a643555d8d42ae476c0ad70eaf">startMessage</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structbmqt_1_1EventBuilderResult.html#a04d8f1ec70faff7c9dce79d82c14844c">bmqt::EventBuilderResult::Enum</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbmqa_1_1MessageEventBuilder.html#a101f3eea6233a4ff2b78b6b8072e3c50">packMessage</a> (const <a class="el" href="classbmqa_1_1QueueId.html">bmqa::QueueId</a> &amp;queueId)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbmqa_1_1MessageEventBuilder.html#adc6901ca79289b4d7b71547ed1e66342">reset</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classbmqa_1_1MessageEvent.html">MessageEvent</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbmqa_1_1MessageEventBuilder.html#a4998ec39691c9f90d639b554d681a782">messageEvent</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbmqa_1_1Message.html">Message</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbmqa_1_1MessageEventBuilder.html#a66898516510a65783c2ad128e1bf14f9">currentMessage</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbmqa_1_1MessageEventBuilder.html#a22d03a5d88d4eb60b2161266e52d96a7">messageCount</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbmqa_1_1MessageEventBuilder.html#a7862f2ba6388721caa66a5ede55a797e">messageEventSize</a> () const </td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>A builder for <code><a class="el" href="classbmqa_1_1MessageEvent.html">MessageEvent</a></code> objects.</p>
<p>See <a class="el" href="group__bmqa__messageeventbuilder.html">Component bmqa_messageeventbuilder</a> </p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a0fe3e05575bbdeeb3cc73ab3505692af"></a><!-- doxytag: member="bmqa::MessageEventBuilder::MessageEventBuilder" ref="a0fe3e05575bbdeeb3cc73ab3505692af" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bmqa::MessageEventBuilder::MessageEventBuilder </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [explicit]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Create an invalid instance. Application should not create <code><a class="el" href="classbmqa_1_1MessageEventBuilder.html">MessageEventBuilder</a></code> themselves, but ask the <code><a class="el" href="classbmqa_1_1Session.html">bmqa::Session</a></code> to give them one, by using <code><a class="el" href="classbmqa_1_1Session.html#a898eeb0dd7a3407bb1a2788ae8ecb7ff">bmqa::Session::loadMessageEventBuilder</a></code>. </p>

</div>
</div>
<a class="anchor" id="a39acd6b649f873adfe7adf665226bc15"></a><!-- doxytag: member="bmqa::MessageEventBuilder::~MessageEventBuilder" ref="a39acd6b649f873adfe7adf665226bc15" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bmqa::MessageEventBuilder::~MessageEventBuilder </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Destructor </p>

</div>
</div>
<a class="anchor" id="a00bf60e4b22e20410a7d94b9fd2fbe32"></a><!-- doxytag: member="bmqa::MessageEventBuilder::MessageEventBuilder" ref="a00bf60e4b22e20410a7d94b9fd2fbe32" args="(const MessageEventBuilder &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bmqa::MessageEventBuilder::MessageEventBuilder </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classbmqa_1_1MessageEventBuilder.html">MessageEventBuilder</a> &amp;&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ac49dff9dc344e34652bb22af127785d2"></a><!-- doxytag: member="bmqa::MessageEventBuilder::operator=" ref="ac49dff9dc344e34652bb22af127785d2" args="(const MessageEventBuilder &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classbmqa_1_1MessageEventBuilder.html">MessageEventBuilder</a>&amp; bmqa::MessageEventBuilder::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classbmqa_1_1MessageEventBuilder.html">MessageEventBuilder</a> &amp;&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Copy constructor and assignment operator </p>

</div>
</div>
<a class="anchor" id="a33d687a643555d8d42ae476c0ad70eaf"></a><!-- doxytag: member="bmqa::MessageEventBuilder::startMessage" ref="a33d687a643555d8d42ae476c0ad70eaf" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classbmqa_1_1Message.html">Message</a>&amp; bmqa::MessageEventBuilder::startMessage </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Reset the current message being built, and return a reference to the current message. Note that returned <code><a class="el" href="classbmqa_1_1Message.html">Message</a></code> is valid until this builder is reset or destroyed. Behavior is undefined if this builder was earlier used to build an event <em>and</em> has not been reset since then. </p>

</div>
</div>
<a class="anchor" id="a101f3eea6233a4ff2b78b6b8072e3c50"></a><!-- doxytag: member="bmqa::MessageEventBuilder::packMessage" ref="a101f3eea6233a4ff2b78b6b8072e3c50" args="(const bmqa::QueueId &amp;queueId)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structbmqt_1_1EventBuilderResult.html#a04d8f1ec70faff7c9dce79d82c14844c">bmqt::EventBuilderResult::Enum</a> bmqa::MessageEventBuilder::packMessage </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classbmqa_1_1QueueId.html">bmqa::QueueId</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>queueId</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Add the current message into the message event under construction, setting the destination queue of the current message to match the specified <code>queueId</code>. Return zero on success, non-zero value otherwise. In case of failure, this method has no effect on the underlying message event being built. The behavior is undefined unless all mandatory attributes of the current <a class="el" href="classbmqa_1_1Message.html">Message</a> have been set, <em>and</em> <code>queueId</code> is valid <em>and</em> has been opened in WRITE mode. The result is one of the values from the <code><a class="el" href="structbmqt_1_1EventBuilderResult.html#a04d8f1ec70faff7c9dce79d82c14844c" title="GENERIC.">bmqt::EventBuilderResult::Enum</a></code> enum. Note that this method can be called multiple times in a row with different <code>queueId</code> if the application desires to post the same <code><a class="el" href="classbmqa_1_1Message.html">bmqa::Message</a></code> to multiple queues: all attributes on the message are unchanged, exception for the <code>correlationId</code> which is cleared. </p>

</div>
</div>
<a class="anchor" id="adc6901ca79289b4d7b71547ed1e66342"></a><!-- doxytag: member="bmqa::MessageEventBuilder::reset" ref="adc6901ca79289b4d7b71547ed1e66342" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void bmqa::MessageEventBuilder::reset </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Reset the builder, effectively discarding the <code><a class="el" href="classbmqa_1_1MessageEvent.html">MessageEvent</a></code> under construction. </p>

</div>
</div>
<a class="anchor" id="a4998ec39691c9f90d639b554d681a782"></a><!-- doxytag: member="bmqa::MessageEventBuilder::messageEvent" ref="a4998ec39691c9f90d639b554d681a782" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classbmqa_1_1MessageEvent.html">MessageEvent</a>&amp; bmqa::MessageEventBuilder::messageEvent </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the <code><a class="el" href="classbmqa_1_1MessageEvent.html">MessageEvent</a></code> that was built. Note that returned <code><a class="el" href="classbmqa_1_1MessageEvent.html">MessageEvent</a></code> is valid until this builder is reset or destroyed, calling this method multiple times in a row will return the same <a class="el" href="classbmqa_1_1MessageEvent.html">bmqa::MessageEvent</a> instance. Also note that this builder must be reset before calling <code>startMessage</code> again. </p>

</div>
</div>
<a class="anchor" id="a66898516510a65783c2ad128e1bf14f9"></a><!-- doxytag: member="bmqa::MessageEventBuilder::currentMessage" ref="a66898516510a65783c2ad128e1bf14f9" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classbmqa_1_1Message.html">Message</a>&amp; bmqa::MessageEventBuilder::currentMessage </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return a reference to the current message. </p>

</div>
</div>
<a class="anchor" id="a22d03a5d88d4eb60b2161266e52d96a7"></a><!-- doxytag: member="bmqa::MessageEventBuilder::messageCount" ref="a22d03a5d88d4eb60b2161266e52d96a7" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int bmqa::MessageEventBuilder::messageCount </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the number of messages currently in the <a class="el" href="classbmqa_1_1MessageEvent.html">MessageEvent</a> being built. </p>

</div>
</div>
<a class="anchor" id="a7862f2ba6388721caa66a5ede55a797e"></a><!-- doxytag: member="bmqa::MessageEventBuilder::messageEventSize" ref="a7862f2ba6388721caa66a5ede55a797e" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int bmqa::MessageEventBuilder::messageEventSize </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the size in bytes of the event built after last successful call to <code><a class="el" href="classbmqa_1_1MessageEventBuilder.html#a101f3eea6233a4ff2b78b6b8072e3c50">packMessage()</a></code>, otherwise return zero. Note that returned value represents the length of entire message event, <em>including</em> BlazingMQ wire protocol overhead. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="bmqa__messageeventbuilder_8h_source.html">bmqa_messageeventbuilder.h</a></li>
</ul>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Jun 15 2023 11:58:51 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>
